package com.kdd.campus.sh.service;

import com.github.pagehelper.PageInfo;
import com.kdd.campus.sh.po.ShCategory;

import java.util.List;

/****
 * @Author:shenkunlin
 * @Description:ShCategory业务层接口
 * @Date 2019/6/14 0:16
 *****/
public interface ShCategoryService {

    /***
     * ShCategory多条件分页查询
     * @param shCategory
     * @param page
     * @param size
     * @return
     */
    PageInfo<ShCategory> findPage(ShCategory shCategory, int page, int size);

    /***
     * ShCategory分页查询
     * @param page
     * @param size
     * @return
     */
    PageInfo<ShCategory> findPage(int page, int size);

    /***
     * ShCategory多条件搜索方法
     * @param shCategory
     * @return
     */
    List<ShCategory> findList(ShCategory shCategory);

    /***
     * 删除ShCategory
     * @param id
     */
    void delete(Integer id);

    /***
     * 修改ShCategory数据
     * @param shCategory
     */
    void update(ShCategory shCategory);

    /***
     * 新增ShCategory
     * @param shCategory
     */
    void add(ShCategory shCategory);

    /**
     * 根据ID查询ShCategory
     * @param id
     * @return
     */
     ShCategory findById(Integer id);

    /***
     * 查询所有ShCategory
     * @return
     */
    List<ShCategory> findAll();

    List<ShCategory> findByLocation(Integer location);

    int getProductCountByCategory(Integer categoryId);
}
